function login() {

    var username = document.getElementById("username");
    var pass = document.getElementById("password");

    if (username.value == "") {

        alert("请输入电子邮件地址");

    } else if (pass.value == "") {

        alert("请输入密码");

    } else if (username.value == "2771063390@qq.com" && pass.value == "123456") {

        window.location.href = "../Confirm?flag=true";
    } else {

        alert("请输入正确的电子邮件地址和密码！")

    }
}